class ProgressBar {
  constructor() {
    if (ProgressBar?.instance?.show) {
      return ProgressBar.instance;
    }
    ProgressBar.instance = {
      close() { },
    };
    // this.close();
    this.status = false;
  }
  close() {
    this.instance.close();
    this.status = false;
  }
  show() {
    if (this.status) return;
    if (!this?.instance?.show){
      this.instance = getCtpTop()?.$?.progressBar() || {
        init() { },
        close() { },
        show() { }
      };
    }else {
      this.instance.init(); 
    }
    this.status = true;
  }
}
export const loadingInstance = new ProgressBar();






